<!––
/*
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.
#
*/
––>
<div style="overflow-y:auto;margin-top:50px;" >
  <div class="container">
    <div class="row mb-2">
      <div class="col">
        <h5 class="font-weight-light">
          HEALTHCARE SUPPLYCHAIN MANAGEMENT
        </h5>
      </div>
    </div>
    <form ngNativeValidate>
      <div class="row">
        <div class="col-sm-12 mx-auto">
          <div class="row">
            <div class="col-sm-3">
              <h5>Create Manufacturer</h5>
              <div class="form-group">
                <input
                  type="number"
                  id="Manufacturer ID"
                  name="Manufacturer ID"
                  class="form-control"
                  required
                  [(ngModel)]="manuFaCreate.manufacturerId"
                />
                <label class="form-control-placeholder" for="Manufacturer ID"
                  >Manufacturer ID</label
                >
              </div>
              <div class="form-group">
                <input
                  type="text"
                  id="Manufacturer Name"
                  name="Manufacturer Name"
                  class="form-control"
                  [(ngModel)]="manuFaCreate.manufacturerName"
                  required
                />
                <label class="form-control-placeholder" for="Manufacturer Name"
                  >Manufacturer Name</label
                >
              </div>

              <div class="form-group">
                <input
                  type="text"
                  id="Manufacturer Location"
                  name="Manufacturer Location"
                  class="form-control"
                  [(ngModel)]="manuFaCreate.manufacturerLocation"
                  required
                />
                <label
                  class="form-control-placeholder"
                  for="Manufacturer Location"
                  >Manufacturer Location</label
                >
              </div>
              <button
                type="button"
                class="btn btn-warning"
                (click)="submitManufacturer(manuFaCreate)"
              >
                Submit
              </button>
              <br />
              <span *ngIf="messageManufacturer">{{ messageManufacturer }}</span>
            </div>
            <div class="col-sm-3">
              <h5>Create Distributor</h5>
              <div class="form-group">
                <input
                  type="number"
                  class="form-control"
                  [(ngModel)]="distrBuCreate.distributorId"
                  id="Distributor ID"
                  name="Distributor ID"
                  required
                />
                <label class="form-control-placeholder" for="Distributor ID"
                  >Distributor ID</label
                >
              </div>
              <div class="form-group">
                <input
                  type="text"
                  id="Distributor Name"
                  name="Distributor Name"
                  class="form-control"
                  required
                  [(ngModel)]="distrBuCreate.distributorName"
                />
                <label class="form-control-placeholder" for="Distributor Name"
                  >Distributor Name</label
                >
              </div>

              <div class="form-group">
                <input
                  type="text"
                  id="Distributor Location"
                  name="Distributor Location"
                  class="form-control"
                  required
                  [(ngModel)]="distrBuCreate.distributorLocation"
                />
                <label
                  class="form-control-placeholder"
                  for="Distributor Location"
                  >Distributor Location</label
                >
              </div>
              <button
                type="button"
                class="btn btn-warning"
                (click)="submitDistributor(distrBuCreate)"
              >
                Submit
              </button>
              <br />
              <span *ngIf="messageDistributor">{{ messageDistributor }}</span>
            </div>
            <div class="col-sm-3">
              <h5>Create Hospital</h5>
              <div class="form-group">
                <input
                  type="number"
                  id="Hospital ID"
                  name="Hospital ID"
                  class="form-control"
                  required
                  [(ngModel)]="hospitalCreate.hospitalId"
                />
                <label class="form-control-placeholder" for="Hospital ID"
                  >Hospital ID</label
                >
              </div>
              <div class="form-group">
                <input
                  type="text"
                  id="Hospital Name"
                  name="Hospital Name"
                  class="form-control"
                  required
                  [(ngModel)]="hospitalCreate.hospitalName"
                />
                <label class="form-control-placeholder" for="Hospital Name"
                  >Hospital Name</label
                >
              </div>

              <div class="form-group">
                <input
                  type="text"
                  id="Hospital Location"
                  name="Hospital Location"
                  class="form-control"
                  required
                  [(ngModel)]="hospitalCreate.hospitalLocation"
                />
                <label class="form-control-placeholder" for="Hospital Location"
                  >Hospital Location</label
                >
              </div>
              <button
                type="button"
                class="btn btn-warning"
                (click)="submitHospital(hospitalCreate)"
              >
                Submit
              </button>
              <br />
              <span *ngIf="messageHospital">{{ messageHospital }}</span>
            </div>

            <div class="col-sm-3">
              <h5>Create Pharmacy</h5>
              <div class="form-group">
                <input
                  type="number"
                  id="Pharmacy ID"
                  name="Pharmacy ID"
                  class="form-control"
                  required
                  [(ngModel)]="pharmaCreate.pharmacyId"
                />
                <label class="form-control-placeholder" for="Pharmacy ID"
                  >Pharmacy ID</label
                >
              </div>
              <div class="form-group">
                <input
                  type="text"
                  id="Pharmacy Name"
                  name="Pharmacy Name"
                  class="form-control"
                  required
                  [(ngModel)]="pharmaCreate.pharmacyName"
                />
                <label class="form-control-placeholder" for="Pharmacy Name"
                  >Pharmacy Name</label
                >
              </div>

              <div class="form-group">
                <input
                  type="text"
                  id="Pharmacy Location"
                  name="Pharmacy Location"
                  class="form-control"
                  required
                  [(ngModel)]="pharmaCreate.pharmacyLocation"
                />
                <label class="form-control-placeholder" for="Pharmacy Location"
                  >Pharmacy Location</label
                >
              </div>
              <button
                type="button"
                class="btn btn-warning"
                (click)="submitPharmacy(pharmaCreate)"
              >
                Submit
              </button>
              <br />
              <span *ngIf="messagePharmacy">{{ messagePharmacy }}</span>
            </div>
          </div>
        </div>
        <br />
        <hr/>
        <div class="col-sm-12 mx-auto" style="margin-top:40px">
          <div class="row">
            <div class="col-sm-3">
              <h5>Create Asset</h5>
              <div class="form-group">
                <input
                  type="number"
                  id="Asset ID"
                  name="Asset ID"
                  class="form-control"
                  required
                  [(ngModel)]="assertCreat.assetId"
                />
                <label class="form-control-placeholder" for="Asset ID"
                  >Asset ID</label
                >
              </div>
              <div class="form-group">
                <input
                  type="text"
                  id="Asset Name"
                  name="Asset Name"
                  class="form-control"
                  required
                  [(ngModel)]="assertCreat.assetName"
                />
                <label class="form-control-placeholder" for="Asset Name"
                  >Asset Name</label
                >
              </div>

              <div class="form-group">
                <input
                  type="text"
                  id="Asset Type"
                  name="Asset Type"

                  class="form-control"
                  required
                  [(ngModel)]="assertCreat.assetType"
                />
                <label class="form-control-placeholder" for="Asset Type"
                  >Asset Type</label
                >
              </div>
              <div class="form-group">
                <input
                  type="text"
                  id="Expiry Date"
                  name="Expiry Date"

                  class="form-control"
                  required
                  [(ngModel)]="assertCreat.assetExpirtyDate"
                />
                <label class="form-control-placeholder" for="Expiry Date"
                  >Expiry Date</label
                >
              </div>
              <div class="form-group">
                <input
                  type="text"
                  id="Asset Owner"
                  name="Asset Owner"
                  class="form-control"
                  required
                  [(ngModel)]="assertCreat.aManufacturerId"
                />
                <label class="form-control-placeholder" for="Asset Owner"
                  >Asset Owner (Manufacturer ID)</label
                >
              </div>
              <button
                type="button"
                class="btn btn-warning"
                (click)="submitAsset(assertCreat)"
              >
                Submit
              </button>
              <br />
              <span *ngIf="message">{{ message }}</span>
            </div>
            <div class="col-sm-3">
              <h5>Get Asset Detail</h5>
              <div class="form-group">
                <input
                  type="number"
                  id="Asset ID"
                  name="fAssetId"
                  class="form-control"
                  required
                  [(ngModel)]="getAsset.fAssetId"
                />
                <label class="form-control-placeholder" for="Asset ID"
                  >Asset ID</label
                >
              </div>

              <button
                type="button"
                class="btn btn-warning"
                (click)="get(getAsset.fAssetId)"
              >
                Fetch
              </button>
              <br />
              <div *ngIf="fetched">
                <p>AssetId : {{ getAsset.fAssetId }}</p>
                <p>AssetName : {{ getAsset.fAssetName }}</p>
                <p>Manufacturer : {{ getAsset.fmanufacturer }}</p>
              </div>
            </div>

            <div class="col-sm-3">
              <h5>Transfer Asset</h5>
              <div class="form-group">
                <input
                  type="number"
                  id="Asset ID"
                  name="tassetId"
                  class="form-control"
                  required
                  [(ngModel)]="assetTrans.tassetId"
                />
                <label class="form-control-placeholder" for="Asset ID"
                  >Asset ID</label
                >
              </div>
              <div class="form-group">
                <input
                  type="number"
                  id="Transfer To ID"
                  name="transferTo"
                  class="form-control"
                  required
                  [(ngModel)]="assetTrans.transferTo"
                />
                <label class="form-control-placeholder" for="Transfer To ID"
                  >Transfer To ID</label
                >
              </div>
              <button
                type="button"
                class="btn btn-warning"
                (click)="transferAsset(assetTrans)"
              >
                Fetch
              </button>
              <br />
              <span *ngIf="messageTransfer">{{ messageTransfer }}</span>
            </div>

            <div class="col-sm-3">
              <h5>Dispose Asset</h5>
              <div class="form-group">
                <input
                  type="number"
                  id="Asset ID"
                  name="dassetId"
                  class="form-control"
                  required
                  [(ngModel)]="disposeasset.dassetId"
                />
                <label class="form-control-placeholder" for="Asset ID"
                  >Asset ID</label
                >
              </div>

              <button
                type="button"
                class="btn btn-warning"
                (click)="disposeAsset(disposeasset)"
              >
                Submit
              </button>
              <br />
              <span *ngIf="messageDispose">{{ messageDispose }}</span>
            </div>
          </div>
        </div>
      </div>
    </form>
  </div>
</div>
